//
//  ItemStore.m
//  iFlick1.4
//
//  Created by vhly on 10-9-16.
//  Copyright 2010 xhzhang. All rights reserved.
//

#import "ItemStore.h"


@implementation ItemStore

@synthesize title;

- (id)init{
	if (self = [super init]) {
		array = [[NSMutableArray alloc] init];
	}
	return self;
}

- (void)addItem:(id)item{
	if (item) {
		[array insertObject:item atIndex:0];
	}
}

- (id)objectAtIndex:(NSUInteger)index{
	NSInteger sz = [array count];
	id ret = nil;
	if (index >= 0 && index < sz) {
		ret = [array objectAtIndex:index];
	}
	return ret;
}

- (void)removeObjectAtIndex:(NSUInteger)index{
	NSInteger sz = [array count];
	if (index >= 0 && index < sz) {
		[array removeObjectAtIndex:index];
	}
}

- (NSInteger)count{
	return [array count];
}

- (void)dealloc{
	[array release];
	[super dealloc];
}

@end
